package com.shn.ClientService;

import org.springframework.beans.factory.ObjectProvider;
import org.springframework.cloud.loadbalancer.core.ReactorServiceInstanceLoadBalancer;
import org.springframework.cloud.loadbalancer.core.ServiceInstanceListSupplier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyLoadBalancerConfig {
	@Bean
	public ReactorServiceInstanceLoadBalancer myLoadBalancer(
			ObjectProvider<ServiceInstanceListSupplier> serviceInstanceListSupplierProvider) {

		return new VersionLoadBalancerClient(serviceInstanceListSupplierProvider);
	}
}
